package com.sunwayworld.basemodule.business.result.resource;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.business.result.bean.LimsRunBean;
import com.sunwayworld.basemodule.business.result.service.LimsRunService;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import com.sunwayworld.framework.support.choosable.resource.GenericChoosableResource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/secure/basemodule/business/runs")
public interface LimsRunResource extends GenericResource<LimsRunService, LimsRunBean, Long>, GenericChoosableResource<LimsRunService, LimsRunBean, Long> {

    @RequestMapping(value = "/action/submit", method = RequestMethod.POST)
    void submit(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/action/pass", method = RequestMethod.POST)
    void passReview(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/action/reject", method = RequestMethod.POST)
    void rejectReview(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/action/abnormal", method = RequestMethod.POST)
    void abnormal(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/check", method = RequestMethod.POST)
    String check(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/action/abnormal/pass", method = RequestMethod.POST)
    void abnormalPass(RestJsonWrapperBean wrapperBean);

    @RequestMapping(value = "/action/abnormal/stop", method = RequestMethod.POST)
    void abnormalStop(RestJsonWrapperBean wrapperBean);

    @PostMapping(value = "/action/result-edit/hand-over")
    JSONObject resultEditHandOver(RestJsonWrapperBean wrapperBean);

    @PostMapping(value = "/action/result-audit/hand-over")
    JSONObject resultAuditHandOver(RestJsonWrapperBean wrapperBean);
}
